let obj = new Vue({
    el:"#user",
    data:{
        user:{}
    },
    created:function () {
        this.init();
    },
    methods:{
        init:function () {
            this.user = JSON.parse(get("user"));
        },
        logout:function () {
             return layer.alert("是否退出登录！", {
                title: '退出登录',
                btn: ['确定'],
                icon: 5,
                closeBtn: 1,
                anim:1
            }, function(){
                remove("token");
                remove("user");
                layer.msg('退出登录成功，再见：' + obj.user.phone,{anim: 1,offset:"t"});
                setTimeout(function () {
                    if (parent == window) {
                        location.href = "../login.html";
                    }
                }, 500);
            });
        }
    }
})
function dealData(item) {
    item.forEach(e => {
        let json = JSON.parse(e.bz);
        if (e.longJump == null) {
            e.longJump = json?.firstTy;
        }
        if (e.longJumpTwo == null) {
            e.longJumpTwo = json?.secondTy;
        }
        if (e.longJumpThree == null) {
            e.longJumpThree = json?.thirdTy;
        }
        if (e.throwBall == null) {
            e.throwBall = json?.firstQq;
        }
        if (e.throwBallTwo == null) {
            e.throwBallTwo = json?.secondQq;
        }
        if (e.throwBallThree == null) {
            e.throwBallThree = json?.thirdQq;
        }
    })
}